# 08-遍历一个列表.py
list = ['张xx','刘xx','af','fwe']
# 1、输出所有名字
i =0 
while i<4:
    print(list[i])
    if list[i]=='af':print('存在')
    i+=1
# 2、检测af是否在里面  in (列表/元组/字符串)
print('af' in list)
print('a' in 'abcdefrgk')
print("a" in ("a","b","c"))

lis1=[{'name':"张三","age":'19'},{'name':"李四","age":'30'},{'name':"王武","age":'45'}]
# 3、获取所有人的年龄+ 计算出总共几岁
a = 0
max_age=0
while a<len(lis1):
    print(lis1[a]['age'])
    max_age+=int(lis1[a]['age'])
    a+=1
print(max_age)
# end="" 让字符在同一行显示
print('hello',end="")
print('word',end="")
# 制表符 \t
print('hell\tword')
print('fnwjfnefwke\tfewfewf')